home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / answers / fonts-faq / part9 < prev    next >
Encoding:
Internet Message Format  |  1993-06-21  |  15.8 KB

  1. Path: senator-bedfellow.mit.edu!enterpoop.mit.edu!gatech!howland.reston.ans.net!noc.near.net!nic.umass.edu!ymir.cs.umass.edu!ymir.cs.umass.edu!usenet
  2. From: walsh@cs.umass.edu (Norman Walsh)
  3. Newsgroups: comp.fonts,comp.answers,news.answers
  4. Subject: comp.fonts FAQ.7.NeXT-Info
  5. Followup-To: poster
  6. Date: 21 Jun 1993 13:19:18 GMT
  7. Organization: Dept of Comp and Info Sci, Univ of Mass (Amherst)
  8. Lines: 402
  9. Approved: news-answers-request@MIT.Edu
  10. Distribution: world
  11. Expires: 21 Jul 93 09:21:06 GMT
  12. Message-ID: <fonts-faq-9-740668866@cs.umass.edu>
  13. References: <fonts-faq-1-740668866@cs.umass.edu>
  14. Reply-To: walsh@cs.umass.edu (Norman Walsh)
  15. NNTP-Posting-Host: ibis.cs.umass.edu
  16. Summary: This posting answers frequently asked questions about fonts.
  17.          It addresses both general font questions and questions that
  18.      are specific to a particular platform.
  19. Xref: senator-bedfellow.mit.edu comp.fonts:9147 comp.answers:1075 news.answers:9624
  20.  
  21. Posted-By: auto-faq 2.4
  22. Archive-name: fonts-faq/part9
  23. Version: 1.4.1
  24.  
  25. Subject: Chapter 7 
  26.  
  27.     NeXT Information
  28.  
  29. Subject: 7.1. Please help! 
  30.  
  31.     If you have any suggestions for this section, please forward your
  32.     suggestions to norm.
  33.  
  34. Subject: 7.2. Tell me about NeXT fonts 
  35.  
  36.     NeXT fonts are Adobe Type 1 fonts stored in ASCII (PFA) format.
  37.     There are several rules about how fonts must be installed before
  38.     they work.
  39.  
  40.     * Basic format
  41.  
  42.       The font itself should be a directory under /Library/Fonts (or
  43.       /LocalLibrary/Fonts or /NextLibrary/Fonts), which should contain
  44.       the various components of the font. The possible components are
  45.       the outline file, the font metrics (.afm) file, and one or more
  46.       screen font (bitmap) files.
  47.  
  48.       At the very least, the font directory must contain the outline
  49.       file and the .afm file. Screen font (bitmap) files are optional.
  50.  
  51.     * Filename requirement
  52.  
  53.       The filename of the font can NOT be any name you choose. For a
  54.       font to work correctly, the base filename MUST BE THE SAME as the
  55.       name in the FontName field of the afm file (and outline file, for
  56.       that matter).
  57.  
  58.       Therefore, the font directory should be named <filename>.font,
  59.       inside of which there should be at least two files:
  60.       <filename>.afm, the font metrics file, and <filename> (no
  61.       extension), the outline file. The bitmap file(s) have the
  62.       extension .bepf.
  63.  
  64.       Variations such as bold, italic, etc., should be their own font
  65.       in their own directory. The <filename> in the examples above
  66.       should be replaced by <filename>-Bold, or <filename>-Italic, etc.
  67.       (Make sure the entries in the .afm and outline files reflect
  68.       this.)
  69.  
  70.       For NeXTStep 1.0, you also need to take the following steps:
  71.  
  72.        * If they do not already exist, create the following
  73.          directories:
  74.  
  75.             ~/Library/Fonts/outline
  76.             ~/Library/Fonts/afm
  77.             ~/Library/Fonts/bitmap
  78.  
  79.        * In each of these directories, create a symbolic link to the
  80.          corresponding component file in each font.
  81.  
  82.       In NeXTStep 2.0 and up, the font description is taken from the
  83.       font directory itself, so you don't need to do this. It may be
  84.       beneficial to simply create these directories and put nothing in
  85.       them, but I'm not sure it matters.
  86.  
  87.       The last step is to get the system to recognize the new font(s).
  88.       You may have noticed the existence of three files in the Fonts
  89.       directory - .fontdirectory, .fontlist, and .afmcache. These are
  90.       the files the system looks at to see which fonts exist.
  91.  
  92.       The easiest way to update them is to simply start up an
  93.       application and open the font panel. It should recognize that the
  94.       update time stamp on the Fonts directory has changed, and update
  95.       the files accordingly. It is probably a good idea to simply
  96.       delete the three above files beforehand.
  97.  
  98.       You should get a message window saying "incorporating information
  99.       on new fonts. Please wait (this may take xx seconds)". Your new
  100.       fonts should be available now.
  101.  
  102.       If this does not work, you can update them manually. Open up a
  103.       Terminal shell and go to your Fonts directory. At the prompt,
  104.       type two commands:
  105.  
  106.          buildafmdir
  107.          cacheAFMData afm   (the parameter is the <afm dir>)
  108.  
  109.       (The new fonts will not work if the cacheAFMData command is not
  110.       run, and since it is an undocumented command, it is a common
  111.       culprit.) [ ed: the cacheAFMData step may not be required in 3.0
  112.       OS ]
  113.  
  114.       You should now be able to see and preview your fonts in the font
  115.       panel.
  116.  
  117.       If you are still having problems with your font, such as the <<
  118.       Unusable font >> message, consult the NeXTAnswers. There are some
  119.       useful suggestions for debugging faulty fonts there. It is also
  120.       always helpful to look at existing fonts to see how they are
  121.       installed.
  122.  
  123.       (One note on the NeXTAnswers. Supposedly there are only a few
  124.       discrete values which are allowed to appear in the weight field
  125.       of the font: ``Ultra Light'', ``Thin'', ``Light'', ``Extra
  126.       Light'', ``Book'', ``Regular'', ``Plain'', ``Roman'', ``Medium'',
  127.       ``Demi'', ``Demi-Bold'', ``Semi-Bold'', ``Bold'', ``Extra Bold'',
  128.       ``Heavy'', ``Heavyface'', ``Black'', ``Ultra'', ``UltraBlack'',
  129.       ``Fat'', ``ExtraBlack'', and ``Obese''. However, I have a few
  130.       fonts where this is not the case (``standard'' is a common entry)
  131.       and have had no problems as of yet. But it would probably be
  132.       wiser to be on the safe side.)
  133.  
  134. Subject: 7.3. Tell me more about NeXT fonts 
  135.  
  136.     * About NeXT fonts
  137.  
  138.       Every NeXT font is placed in its own .font folder which should
  139.       contain at least two files. An outline file which should be named
  140.       the same as folder but without any extension. Also a
  141.       well-formated .afm is required. E.g
  142.  
  143.          ~/Library/Fonts/Headhunter.font/Headhunter
  144.          ~/Library/Fonts/Headhunter.font/Headhunter.afm
  145.  
  146.       is the minimal setup for Headhunter font.
  147.  
  148.       The outline files should be in the PFA or hexadecimal ASCII
  149.       format. The fontname is should be taken either from outline file
  150.       or the AFM file. In both case the name is given after the word
  151.       ``FontName'' at the beginning of the file)
  152.  
  153.     * Converted fonts after the conversion
  154.  
  155.       After conversion they are just like any other freeware or
  156.       shareware font that you can get in the NeXT-format from the
  157.       archives. That's just outline and afm files but no bitmapped
  158.       screen fonts. So small point size means poor resolution on screen
  159.       but they most of should print ok if they are any good ( = usually
  160.       made with Fontographer).
  161.  
  162.     * About conversion utilities
  163.  
  164.       I usually first convert the Mac Type 1 (or 3) fonts to PC format
  165.       which is a lot closer to NeXT format and then convert the
  166.       PC(Windows PFB) fonts to NeXT-format. Instructions for converting
  167.       from Mac to PC format appear elsewhere in the comp.fonts FAQ.
  168.  
  169.     * NeXT utilities
  170.  
  171.        * unfont
  172.  
  173.          You can find a package, named something like
  174.          pcATMfont2NeXT.tar.Z, from NeXT archives (cs.orst.edu) that
  175.          converts PC fonts to NeXT format (PFB -> PFA).
  176.  
  177.          The most useful tool for me has been ``unfont'' which converts
  178.          the .pfb (binary outline) font to ASCII outline font.
  179.  
  180.          I usually use it like this
  181.  
  182.          $ unfont new_font.pfb >NewFont
  183.  
  184.          If the conversion was successful all I have to after that is
  185.          maybe to rename the font correctly and move the outline file
  186.          in the correct .font folder.
  187.  
  188.        * Opener.app
  189.  
  190.          Opener seems to be a very useful application since it can open
  191.          several kinds file packages on NeXT that are common on other
  192.          platforms. E.g. ``.sit", ".hqx", ".zoo", ".zip", ".z'', etc.
  193.  
  194.          I haven't used it a lot but looks very promising.
  195.  
  196.        * T1utils-1.1
  197.  
  198.          This is collection of command-line programs that manipulate PS
  199.          Type 1 fonts and one of them can also do the PFB->PFA
  200.          conversion (t1ascii?).
  201.  
  202.     * SUMMARY
  203.  
  204.       Basic unarchiving of Mac and PC files
  205.  
  206.     On any (?) Unix including NeXT
  207.     ------------------------------
  208.  
  209.     Tool             Conversion      Follow-up action
  210.  
  211.     xbin             .hqx -> .data   rename and transfer to a PC (or use opener.app on NeXT?)
  212.                              .info   discard
  213.                              .rcrc   discard
  214.  
  215.     unzip            .zip ->  .inf   discard
  216.                               .wfn   discard
  217.                               .pfm   discard (unless it can generate a better .afm)
  218.                             <rest>   Transfer to NeXT
  219.  
  220.     On a PC
  221.     -------
  222.  
  223.     Tool             Conversion      Follow-up action
  224.  
  225.     xbin             .hqx -> .data   rename the file to .sit or .cpt accordingly if necessary
  226.                              .info   discard
  227.                              .rcrc   discard
  228.  
  229.     extract -f ...   .cpt ->         (outline files usually don't have extensions),
  230.                                      refont and transfer to NeXT
  231.                               .afm   transfer to NeXT
  232.                               .pfm   discard (unless it can generate a better .afm)
  233.                               .bma   discard if you have .afm
  234.  
  235.     unsit30 -eb      .sit ->         (outline files usually don't have extensions),
  236.                                      refont and transfer to NeXT
  237.                               .afm   transfer to NeXT
  238.                               .pfm   discard (unless it can generate a better .afm)
  239.                               .bma   discard if you have .afm
  240.  
  241.     refont       (Mac outline) -> (PC or NeXT outline)    Transfer to NeXT
  242.  
  243.     pkunzip          .zip -> .inf    discard
  244.                              .wfn    discard
  245.                              .pfm    discard (unless it can generate a better .afm)
  246.                            <rest>    Transfer to NeXT
  247.  
  248.     On a NeXT
  249.     ---------
  250.     Tool                 Conversion
  251.  
  252.     Opener.app      *.sit, *.hqx, *.zip...    Creates a fo|der in the /tmp from where
  253.                                               the resulting files can be moved elsewhere.
  254.  
  255.     unfont          .pfb -> (outline font without an extension)
  256.  
  257.     afm             .afm -> .afm    converts the the carriage-returns to newlines,
  258.                                     (afm = "tr '\015' '\012' <$1 >$2")
  259.  
  260.     * Installation
  261.  
  262.       There are scripts (installfont) available that can handle the
  263.       installation process but here is how you do it manually.
  264.  
  265.     * .font
  266.  
  267.       After all that you have to create the .font folder, move the
  268.       outline and .afm files there and start fighting with the
  269.       strangely formated .afm file. The most common problems are font
  270.       name mismatch between outline and afm files (family name is
  271.       incorrect or too long, etc) and missing fields (ex. no
  272.       ItalicAngle entry) in the afm file.
  273.  
  274.     * buildafmdir AND cacheAFMData
  275.  
  276.       buildafmdir puts its complains to Console but cacheAFMData put
  277.       them on stdout or stderr (ie. Terminal Window).
  278.  
  279.       PARSE ERRORS ------------ ``Parse error 10000011 ...'' comes from
  280.       mismatch between of CharMetrics declared in the .afm and actually
  281.       found. I haven't been able to figure out the other strange parse
  282.       errors.
  283.  
  284.       buildafmdir in the 3.0 release has the limitation of not being
  285.       able to install more that 255 fonts (in one folder ?).
  286.  
  287. Subject: 7.4. Porting fonts to the NeXT 
  288.  
  289. 7.4.1. Porting PC/Unix Type 1 Fonts 
  290.  
  291.     You must have the .pfb and .afm files
  292.  
  293.     A PC Adobe font is stored in binary format, so the first step is to
  294.     convert it to ascii.
  295.  
  296.     There are a couple of utilities out there which can do this. I
  297.     think t1utils can do it, and there is a nice utility called
  298.     pcATMfont2Next which has a couple of tools to do this (unfont and
  299.     pfb2ps). Look for the file pcATMfont2Next.tar.Z; it is available on
  300.     many ftp sites.
  301.  
  302.     Also, since NeXTs run on Unix, there is the customary problem of
  303.     converting the CRs (carriage returns) that PCs use to the LFs
  304.     (Linefeeds) that Unix uses. The easiest way to do this is to use tr
  305.     to delete the octal for the CR character from both the .afm and
  306.     outline file. The command to do this is:
  307.  
  308.        tr -d '\015' < inputfile  > outputfile
  309.  
  310.     The unfont program will do this automatically when it converts the
  311.     .pfb file, but pfb2ps does not. I'm not sure if t1utils' utility
  312.     does or not.
  313.  
  314.     Once you have the outline file, you can go ahead and install it by
  315.     the process outlined above.
  316.  
  317.     Otto J. Makela (otto@jyu.fi) posted a terrific cshell script to
  318.     comp.fonts, which automates just about everything for you. It
  319.     converts the .pfb to ASCII format, extracts the name from the
  320.     FontName field, creates the font directory, copies in the component
  321.     files with the correct name, and runs buildafmdir and cacheAFMData
  322.     when done.
  323.  
  324.     Note that it uses the unfont utility from the pcATMfont2Next
  325.     package, so to use this you will need that too.
  326.  
  327.     Just take everything between the CUT HERE lines, save it into a
  328.     text file, and make it executable with the chmod command or the
  329.     Inspector.
  330.  
  331.   --------------CUT HERE---------------
  332.   #!/bin/csh -f
  333.   # Font install program -- 1992 by Otto J. Makela <otto@jyu.fi>
  334.  
  335.   set progname="$0" todir=~/Library/Fonts
  336.   set progname="$progname:t"
  337.  
  338.   if ( $#argv>0 && -d "$1" ) then
  339.  
  340.          set todir="$1"
  341.          shift
  342.   endif
  343.  
  344.   if ( $#argv == 0 ) then
  345.          echo "usage: $progname [installdir] afmfile..."
  346.          exit
  347.   endif
  348.  
  349.   foreach afmfile ( $* )
  350.  
  351.       echo "${afmfile}:"
  352.       set fontname=`tr -d '\015' < $afmfile | awk '$1=="FontName" {
  353.   print $2 } '`
  354.  
  355.       if ( -d $todir/${fontname}.font ) then
  356.               echo "${progname}: font $fontname already installed"
  357.               continue
  358.       endif
  359.  
  360.   # If there already is a pfa, no need to translate, otherwise convert
  361.   to ascii
  362.          if ( -f ${afmfile:r}.pfa ) then
  363.                  mkdir ${todir}/${fontname}.font
  364.  
  365.                  cp ${afmfile:r}.pfa
  366.   ${todir}/${fontname}.font/${fontname}
  367.          else if ( -f ${afmfile:r}.pfb ) then
  368.                  mkdir ${todir}/${fontname}.font
  369.                  unfont ${afmfile:r}.pfb >
  370.   ${todir}/${fontname}.font/${fontname}
  371.          else
  372.                  echo "${progname}: no pfa/pfb file for $fontname afm"
  373.                  continue
  374.          endif
  375.   # Strip CR's from afm file
  376.          tr -d '\015' < $afmfile >
  377.   ${todir}/${fontname}.font/${fontname}.afm
  378.  
  379.          echo "installed as $fontname"
  380.   end
  381.  
  382.   buildafmdir $todir
  383.   cacheAFMData $todir
  384.  
  385.   ---------------CUT HERE-----------
  386.  
  387.     The original installfont script is available as a shar file from
  388.     ibis.cs.umas.edu in /pub/norm/comp.fonts/installfont-for-NeXT.
  389.  
  390. 7.4.2. Porting Mac Type 1 Fonts 
  391.  
  392.     Regarding this section: Henry McGilton of Trilithon Systems has
  393.     built a `MACtoPFA' utility that runs on the NeXT and converts Mac
  394.     to NeXT format. Trilithon Software, Two Ohlone, Portola Valeey, CA
  395.     94028 (415) 851 7233.
  396.  
  397. Subject: 7.5. Font availability 
  398.  
  399.     Public Domain fonts for the NeXT are available via anonymous FTP
  400.     from sonata.purdue.edu, in the directory next/graphics/fonts. The
  401.     README for this file states that the directory is currently being
  402.     restructured by the archive moderator, although fonts are still
  403.     available in that directory.
  404.  
  405. Subject: 7.6. Why can I only install 256 fonts on my NeXT? 
  406.  
  407.     Included to NS3.0 there's a new 'buildafm'-routine (for
  408.     non-NeXTers: 'buildafm' is a shell script which announces a new
  409.     font to the computer) at /usr/bin/buildafmdir. The new one only
  410.     allows to install about 256 fonts. Running the new 'buildafmdir' to
  411.     install a new font surpresses every font above this number.
  412.     Workaround: Re-install the 'old buildafmdir' from NS2.1 at
  413.     /usr/bin/buildafmdir and everything should be fine!
  414.  
  415.     (thanks to: Rob Parkhill <rob@hobbes.cuc.ab.ca> and d'Art
  416.     Computers/Germany d'art <post@dart.de>)
  417.  
  418.     [ Ed: and my thanks to Borris Balzer <borris@boba.rhein-main.DE>
  419.     for sending this to me ]
  420.  
  421.  
  422.  
  423.